package nl.hanze.designpatterns.domain;

import java.io.Serializable;
import java.util.ArrayList;

import nl.hanze.designpatterns.res.builder.Identifiable;

public class Question implements Identifiable, Serializable, FAQcomponent{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String question;
	private ArrayList<Integer> answers = new ArrayList<Integer>();
	private ArrayList<Answer> answerobjects = new ArrayList<Answer>();
	private final int objectID;
	private String description;
	
	
	
	public Question(String question, int id){
		this.question = question;
		this.objectID=id;
		description = "geen descriptie beschikbaar";
		
	}
	public Question(String question, int id, String description){
		this.objectID=id;
		this.question = question;
		this.description = description;
	}
	
	public ArrayList<Answer> getAnswerobjects() {
		return answerobjects;
	}

	public void setAnswerobjects(ArrayList<Answer> answerobjects) {
		this.answerobjects = answerobjects;
	}
	
	public void addAnswer(Answer answer){
		answerobjects.add(answer);
	}
	
	public String getQuestion(){
		return question;
	}

	public ArrayList<Integer> getanswers() {
		return answers;
	}
	
	public void addAnswer(int id){
		answers.add(id);
	}

	@Override
	public int getObjectID() {
		// TODO Auto-generated method stub
		return 0;
	}
	
	public String getDescription() {
		return description;
	}
	
	public void setDescription(String description) {
		this.description = description;
	}
}
